home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume12 / hershtools / part05 < prev    next >
Encoding:
Internet Message Format  |  1987-10-24  |  17.9 KB

  1. Subject:  v12i044:  Hershey font manipulation tools and data, Part05/05
  2. Newsgroups: comp.sources.unix
  3. Sender: sources
  4. Approved: rs@uunet.UU.NET
  5.  
  6. Submitted-by: lee@uhccux.UUCP (Greg Lee)
  7. Posting-number: Volume 12, Issue 44
  8. Archive-name: hershtools/part05
  9.  
  10. This provides compatibility between my Hershey utlilities
  11. and the Hershey font data from volume 4 of mod.sources.
  12.  
  13. #! /bin/sh
  14. # This is a shell archive.  Remove anything before this line, then unpack
  15. # it by saving it into a file and typing "sh file".  To overwrite existing
  16. # files, type "sh file -c".  You can also feed this as standard input via
  17. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  18. # will see the following message at the end:
  19. #        "End of archive 1 (of 1)."
  20. # Contents:  Makefile Manifest README2 cnv.c dif-eplot.c dif-hplot.c
  21. #   dif-vfont.c h2s.l
  22. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  23. if test -f Makefile -a "${1}" != "-c" ; then 
  24.   echo shar: Will not over-write existing file \"Makefile\"
  25. else
  26. echo shar: Extracting \"Makefile\" \(1201 characters\)
  27. sed "s/^X//" >Makefile <<'END_OF_Makefile'
  28. X.SUFFIXES: .spec .hmp .chr
  29. X
  30. Xall: cnv h2s
  31. X
  32. Xcnv:    cnv.c
  33. X    cc -O -s -o cnv cnv.c
  34. X
  35. Xh2s:    h2s.l
  36. X    lex h2s.l
  37. X    cc -o h2s lex.yy.c -ll
  38. X    rm lex.yy.c
  39. X
  40. Xgreekp.spec: greekp.hmp
  41. X    rm -f greekp.spec
  42. X    echo "base 5" >greekp.spec
  43. X    echo "ytop 14" >>greekp.spec
  44. X    h2s <greekp.hmp >>greekp.spec
  45. X
  46. Xromanp.spec: romanp.hmp
  47. X    rm -f romanp.spec
  48. X    echo "base 5" >romanp.spec
  49. X    echo "ytop 14" >>romanp.spec
  50. X    h2s <romanp.hmp >>romanp.spec
  51. X
  52. Xgreekcs.spec:    greekcs.hmp
  53. X    rm -f greekcs.spec
  54. X    echo "base 6" > greekcs.spec
  55. X    echo "ytop 10" >> greekcs.spec
  56. X    h2s < greekcs.hmp >> greekcs.spec
  57. X
  58. Xitaliccs.spec:    italiccs.hmp
  59. X    rm -f italiccs.spec
  60. X    echo "base 6" > italiccs.spec
  61. X    echo "ytop 10" >> italiccs.spec
  62. X    h2s < italiccs.hmp >> italiccs.spec
  63. X
  64. Xromancs.spec:    romancs.hmp
  65. X    rm -f romancs.spec
  66. X    echo "base 6" > romancs.spec
  67. X    echo "ytop 10" >> romancs.spec
  68. X    h2s < romancs.hmp >> romancs.spec
  69. X
  70. X.hmp.chr:
  71. X    make $*.spec
  72. X    rm -f $*.chr
  73. X    cnv <$*.spec >$*.chr
  74. X
  75. X.hmp.spec:
  76. X    rm -f $*.spec
  77. X    h2s <$*.hmp >$*.spec
  78. X
  79. Xoccidental:    hersh.oc1 hersh.oc2 hersh.oc3 hersh.oc4
  80. X    rm -f occidental
  81. X    cat hersh.oc1 hersh.oc2 hersh.oc3 hersh.oc4 >occidental
  82. X
  83. Xoriental:    hersh.or1 hersh.or2 hersh.or3 hersh.or4
  84. X    rm -f oriental
  85. X    cat hersh.or1 hersh.or2 hersh.or3 hersh.or4 >oriental
  86. END_OF_Makefile
  87. if test 1201 -ne `wc -c <Makefile`; then
  88.     echo shar: \"Makefile\" unpacked with wrong size!
  89. fi
  90. # end of overwriting check
  91. fi
  92. if test -f Manifest -a "${1}" != "-c" ; then 
  93.   echo shar: Will not over-write existing file \"Manifest\"
  94. else
  95. echo shar: Extracting \"Manifest\" \(464 characters\)
  96. sed "s/^X//" >Manifest <<'END_OF_Manifest'
  97. X   File Name        Archive #    Description
  98. X-----------------------------------------------------------
  99. X Makefile                  1    
  100. X Manifest                  1    this file
  101. X README2                   1    
  102. X cnv.c                     1    cnv <specfile >chrfile
  103. X dif-eplot.c               1    patch eplot.c dif-eplot.c
  104. X dif-hplot.c               1    patch hplot.c dif-hplot.c
  105. X dif-vfont.c               1    patch vfont.c dif-vfont.c
  106. X h2s.l                     1    h2s <hmpfile >specfile
  107. END_OF_Manifest
  108. if test 464 -ne `wc -c <Manifest`; then
  109.     echo shar: \"Manifest\" unpacked with wrong size!
  110. fi
  111. # end of overwriting check
  112. fi
  113. if test -f README2 -a "${1}" != "-c" ; then 
  114.   echo shar: Will not over-write existing file \"README2\"
  115. else
  116. echo shar: Extracting \"README2\" \(1736 characters\)
  117. sed "s/^X//" >README2 <<'END_OF_README2'
  118. X
  119. XA while back I posted some Hershey utilities to edit files of
  120. Xvector data and to create from them various sorts of fonts.
  121. XHowever, the vector data is in an idiosyncratic format -- .chr
  122. Xfiles.  Now here are routines to create such files from the
  123. XHershey data in the form in which it was posted in volume 4
  124. Xof mod.sources.  Rather than use the .hmp format for specifying
  125. Xa mapping from Hershey character number to ascii, I decided
  126. Xto use the .spec format of William LeFebvre's hfont package
  127. X(in volume 5 of comp.sources.unix), since it is more complete.
  128. XBut means for creating .spec files from the data in the .hmp
  129. Xfiles that come with the Hershey data are here included.
  130. X
  131. XIf these files are placed in the same directory as the Hershey
  132. Xdata, one can proceed as follows:
  133. X    (1) make
  134. X        (constructs programs cnv and h2s)
  135. X    (2) make occidental
  136. X        (occidental is hersh.oc? concatenated)
  137. X    (3) make <name>.chr
  138. X        OR make <name>.spec THEN make <name>.chr
  139. X        (where <name>.hmp is one of the Hershey map files)
  140. X
  141. XFor oriental fonts, create (somehow) a .spec file with a
  142. Xfirst line "repertory oriental", make oriental, then
  143. X    cnv <name.spec >name.chr
  144. X
  145. XHere are also 3 patch files, dif-*, which ought to be applied
  146. Xto the source files I distributed previously, to make the utilities
  147. Xeplot and hplot more compatible with the .chr files generated
  148. Xthrough the above procedure.
  149. X
  150. XThe code in cnv.c was adapted from hershey.c by James Hurt (translated
  151. Xby Pete Holzmann) and from hfont.c by William LeFebvre.
  152. X
  153. XGreg Lee, 10/12/87
  154. XU.S.mail: 562 Moore Hall, Dept. of Linguistics, Univ. of Hawaii, HONO, HI 96822
  155. XINTERNET: lee@uhccux.uhcc.hawaii.edu
  156. XUUCP:     {ihnp4,dcdwest,ucbvax}!sdcsvax!nosc!uhccux!lee
  157. XBITNET:   lee%uhccux.uhcc.hawaii.edu@rutgers.edu
  158. END_OF_README2
  159. if test 1736 -ne `wc -c <README2`; then
  160.     echo shar: \"README2\" unpacked with wrong size!
  161. fi
  162. # end of overwriting check
  163. fi
  164. if test -f cnv.c -a "${1}" != "-c" ; then 
  165.   echo shar: Will not over-write existing file \"cnv.c\"
  166. else
  167. echo shar: Extracting \"cnv.c\" \(7406 characters\)
  168. sed "s/^X//" >cnv.c <<'END_OF_cnv.c'
  169. X#include <stdio.h>
  170. X
  171. X#ifndef TRUE
  172. X#define TRUE 1
  173. X#define FALSE 0
  174. X#endif
  175. X
  176. X/*
  177. X * cnv.c   Make a .chr file from a .spec file (LeFebvre format,
  178. X *        on standard input) and Hershey data in Hurt
  179. X *        format in (default) file occidental.
  180. X * This code is adapted from hershey.c by James Hurt
  181. X * (translated by Pete Holzmann)
  182. X * and from hfont.c by William LeFebvre.
  183. X *        --Greg Lee, 10/12/87
  184. X */
  185. X
  186. X       FILE    *fopen();
  187. X
  188. X      /* some variables to record the largest bounding rectangle of
  189. X         the displayed characters. Printed when all finished. */
  190. X
  191. X      int minx = 999;
  192. X    int miny = 999;
  193. X    int maxx = -999;
  194. X    int maxy = -999;
  195. X
  196. X/*    .. font data file name */
  197. X      char name[80];
  198. X
  199. X/* readspec globals: */
  200. X
  201. X# define  Off   0
  202. X# define  On    1
  203. X
  204. X# define  No    0
  205. X# define  Yes    1
  206. X
  207. X# define  MAX_ORD    4000        /* maximum Hershey font number */
  208. X
  209. Xchar   input[256];
  210. Xchar    order[MAX_ORD];
  211. Xint    left_max, right_max;
  212. Xint    up_max, down_max;
  213. Xint    vtrans;
  214. Xdouble x_factor;
  215. Xdouble real_x_factor;
  216. Xdouble x_trans;
  217. XFILE   *vecfont;
  218. X
  219. Xint  left_ex;
  220. Xint  map_to_char;
  221. Xint  baseline;
  222. Xint  hi_char = 168;
  223. X
  224. Xint ytop = 22;
  225. Xint base = 9;
  226. Xint xheight = 0;
  227. X
  228. Xchar verbose = No;
  229. X
  230. Xchar *gets();
  231. Xchar *vgets();
  232. Xchar *index();
  233. Xchar *process_option();
  234. X
  235. X
  236. X/*
  237. X * scanint: a function to scan an integer, using n characters of
  238. X *          the input file, ignoring newlines. (scanf won't work
  239. X *          because it also ignores blanks)
  240. X */
  241. Xint scanint(file,n)
  242. XFILE *file;
  243. Xint n;
  244. X{
  245. Xchar buf[20];
  246. Xint i,c;
  247. X
  248. X   for (i=0;i<n;i++){
  249. X      while ((c = fgetc(file)) == '\n') ; /* discard spare newlines */
  250. X      if (c == EOF) return(-1);
  251. X       buf[i] = c;
  252. X   }
  253. X   
  254. X   buf[i] = 0;
  255. X   return(atoi(buf));
  256. X}
  257. X
  258. X
  259. Xint skipflag = 1; /* 1 if next draw is 'pen up' */
  260. Xint cocnt = 2;
  261. Xint oldx,oldy;
  262. X
  263. Xstatic void
  264. Xskip()
  265. X{
  266. Xskipflag = TRUE;
  267. X    printf(" Pen Up\n   ");
  268. X    cocnt = 0;
  269. X}
  270. X
  271. Xstatic void
  272. Xdraw(newx,newy)
  273. Xint newx,newy;
  274. X{
  275. X    if (cocnt > 8) {
  276. X        printf("\n   ");
  277. X        cocnt = 0;
  278. X    }
  279. X    printf("(%d,%d)", newx, -newy);
  280. X    cocnt++;
  281. X}
  282. X
  283. X/*
  284. X * The main program...
  285. X */
  286. X
  287. Xmain(argc,argv)
  288. Xint argc;
  289. Xchar **argv;
  290. X{
  291. X/*    .. font data   */
  292. X      char line[2][256];
  293. X      int x,y;
  294. X      float col,row;
  295. X/*    .. which data point and which character */
  296. X      int     ipnt,ich,nch,i,ichar;
  297. X    int    letter;
  298. X
  299. X/*
  300. X        if (argc != 2) {
  301. X         printf("usage: cnv file\n");
  302. X         exit(1);
  303. X      }
  304. X*/
  305. X    ytop = 22;
  306. X    base = 9;
  307. X
  308. X    readspec();
  309. X
  310. X    printf("Height(%d)\n", ytop);
  311. X    if (xheight) printf("x Height(%d)\n", xheight);
  312. X    if (base) printf("Base(%d)\n", base);
  313. X
  314. X/*             .. loop per character */
  315. X      while (TRUE) {
  316. X
  317. X/*             .. read character number and data */
  318. X      if ((ich = scanint(vecfont,5)) < 1) {
  319. X            exit(0);
  320. X      }
  321. X
  322. X    if (ich >= MAX_ORD) {
  323. X    fprintf(stderr, "Hershey data has big character number");
  324. X    exit(1);
  325. X    }
  326. X
  327. X      nch = scanint(vecfont,3);
  328. X
  329. X      for (i=0; i<nch;i++) {
  330. X         if ((i==32) ||(i==68) ||(i==104) ||(i==140)) fgetc(vecfont); /* skip newlines */
  331. X         line[0][i] = fgetc(vecfont);
  332. X         line[1][i] = fgetc(vecfont);
  333. X      }
  334. X      fgetc(vecfont);
  335. X
  336. X  if ( (letter = order[ich]) != 0)
  337. X  {
  338. X/*             .. identify character */
  339. X    if (letter < ' ') printf("^%c': ", letter + 64);
  340. X    else if (letter >= 127) printf("\\%o: ", letter);
  341. X    else printf("'%c': ", letter);
  342. X
  343. X
  344. X/*             .. draw left and right lines */
  345. X/*             .. Note: this data can be used for proportional spacing */
  346. X
  347. X      x=(int)line[0][0] - (int)'R';
  348. X      y=(int)line[1][0] - (int)'R';
  349. X
  350. X/*      skip();
  351. X      draw(x,-10);draw(x,10);
  352. X      skip();
  353. X      draw(y,-10);draw(y,10);
  354. X*/
  355. X    printf("Bounds(%d,%d)", x, y);
  356. X    if (letter == ' ') {
  357. X        draw(x,0);
  358. X        draw(y,0);
  359. X    }
  360. X
  361. X/*             .. first data point is a move */
  362. X/*      skip();*/
  363. X/*             .. loop per line of data */
  364. X    for (ipnt=1;ipnt<nch;ipnt++) {
  365. X
  366. X/*             .. process vector number ipnt */
  367. X      if (line[0][ipnt] == ' ') {
  368. X/*                .. next data point is a move */
  369. X         skip();
  370. X      } else {
  371. X/*                .. draw (or move) to this data point */
  372. X         x=(int)line[0][ipnt] -(int) 'R';
  373. X         y=(int)line[1][ipnt] -(int) 'R';
  374. X         if (x < minx) minx = x;
  375. X         if (x >maxx) maxx = x;
  376. X         if (-y < miny) miny = -y;
  377. X         if (-y >maxy) maxy = -y;
  378. X/*                .. Note that Hershey Font data is in TV coordinate system */
  379. X           draw(x,-y);
  380. X      }
  381. X    } /* for loop */
  382. X/*             .. end of this character */
  383. X    printf(" End Char\n");
  384. X    cocnt = 2;
  385. X   } /* end if */
  386. X
  387. X   } /* while true */
  388. X}
  389. X
  390. X/*
  391. X *  Read a .spec file
  392. X *  adapted from hfont.c, which was
  393. X *  written by William LeFebvre, LCSE, Rice University
  394. X */
  395. X
  396. Xreadspec()
  397. X
  398. X{
  399. X    int i;
  400. X    int j;
  401. X    int arg;
  402. X    int bytecnt;
  403. X    int pt_size = 0;
  404. X    int char_num;
  405. X    int space_char;
  406. X    int filesize;
  407. X    unsigned char bytemask;
  408. X    unsigned char byte;
  409. X    char *inp;
  410. X    char *p;
  411. X    static char repertory[256] = "occidental";
  412. X    static char pen_file[256] = "pen.round";
  413. X    static char buff[256];
  414. X    struct dispatch *character;
  415. X
  416. X    /* read options from stdin */
  417. X
  418. X    while (vgets(input) != NULL && strcmp(input, "charset") != 0)
  419. X    {
  420. X    /* get the option name */
  421. X    if ((p = index(input, ' ')) != 0)
  422. X    {
  423. X        *p = '\0';
  424. X    }
  425. X    while (*(++p) == ' ');
  426. X
  427. X    /* string switch on option names */
  428. X    if (strcmp(input, "repertory") == 0)
  429. X    {
  430. X        strcpy(repertory, p);
  431. X    }
  432. X    else if (strcmp(input, "maxchar") == 0)
  433. X    {
  434. X        hi_char = atoi(p);
  435. X    }
  436. X    else if (strcmp(input, "pen") == 0)
  437. X    {
  438. X        strcpy(pen_file, p);
  439. X    }
  440. X    else if (strcmp(input, "aspect") == 0)
  441. X    {
  442. X        x_factor *= atof(p);
  443. X    }
  444. X    else if (strcmp(input, "base") == 0)
  445. X    {
  446. X        base = atoi(p);
  447. X    }
  448. X    else if (strcmp(input, "ytop") == 0)
  449. X    {
  450. X        ytop = atoi(p);
  451. X    }
  452. X    else if (strcmp(input, "xheight") == 0)
  453. X    {
  454. X        xheight = atoi(p);
  455. X    }
  456. X    else
  457. X    {
  458. X        fprintf(stderr, "Unknown option: `%s'\n", input);
  459. X        exit(1);
  460. X    }
  461. X    }
  462. X
  463. X    /* open the font files */
  464. X    if ((vecfont = fopen(repertory, "r")) == NULL)
  465. X    {
  466. X    perror(repertory);
  467. X    exit(1);
  468. X    }
  469. X
  470. X
  471. X    /* remember what the real x factor is */
  472. X
  473. X    real_x_factor = x_factor;
  474. X
  475. X    /* translate the characters */
  476. X
  477. X    while(vgets(input) != NULL)
  478. X    {
  479. X    /* get the character desired */
  480. X
  481. X    space_char = char_num = 0;
  482. X    if (input[0] == 's')
  483. X    {
  484. X        /* space character of specified width */
  485. X        space_char = atoi(&(input[1]));
  486. X    }
  487. X    else if (input[0] == 'p')
  488. X    {
  489. X        /* image of the drawing pen */
  490. X        char_num = -1;
  491. X    }
  492. X    else
  493. X    {
  494. X        /* normal vector character */
  495. X        char_num = atoi(input);
  496. X    }
  497. X
  498. X    /* find the font character to use */
  499. X
  500. X    if ((inp = index(input, ',')) == 0)
  501. X    {
  502. X        fprintf(stderr, "bad character designation in `%s'\n",
  503. X        input);
  504. X        break;
  505. X    }
  506. X    if ((inp[1] == '\\') && (inp[2] != '\0'))
  507. X    {
  508. X        /* octal format */
  509. X        sscanf(&(inp[2]), "%o", &map_to_char);
  510. X    }
  511. X    else
  512. X    {
  513. X        /* character format */
  514. X        map_to_char = inp[1];
  515. X    }
  516. X
  517. X    if (char_num < MAX_ORD) order[char_num] = map_to_char;
  518. X
  519. X    /* check for extra options */
  520. X
  521. X    vtrans = 0;
  522. X    inp += 2;
  523. X    if ((inp = process_option(inp)) != 0)
  524. X    {
  525. X        process_option(inp);
  526. X    }
  527. X
  528. X    } /* end while */
  529. X
  530. X}
  531. X
  532. X/*
  533. X *  process_option(ptr) - process possible line option pointed to by ptr.
  534. X */
  535. X
  536. Xchar *process_option(ptr)
  537. X
  538. Xchar *ptr;
  539. X
  540. X{
  541. X    if ((ptr = index(ptr, ',')) != 0)
  542. X    {
  543. X    ptr++;
  544. X    if (ptr[0] == 'r')
  545. X    {
  546. X        /* aspect ratio */
  547. X        x_factor *= atof(&ptr[1]);
  548. X    }
  549. X    else
  550. X    {
  551. X        /* assume it's vertical translation */
  552. X        vtrans = atoi(&(ptr[0]));
  553. X    }
  554. X    }
  555. X    return(ptr);
  556. X}
  557. X
  558. Xchar *vgets(buff)
  559. X
  560. Xregister char *buff;
  561. X
  562. X{
  563. X    register char *retval;
  564. X
  565. X    if ((retval = gets(buff)) != NULL && verbose)
  566. X    {
  567. X    fprintf(stderr, "%s\n", buff);
  568. X    }
  569. X    return(retval);
  570. X}
  571. X
  572. X
  573. END_OF_cnv.c
  574. if test 7406 -ne `wc -c <cnv.c`; then
  575.     echo shar: \"cnv.c\" unpacked with wrong size!
  576. fi
  577. # end of overwriting check
  578. fi
  579. if test -f dif-eplot.c -a "${1}" != "-c" ; then 
  580.   echo shar: Will not over-write existing file \"dif-eplot.c\"
  581. else
  582. echo shar: Extracting \"dif-eplot.c\" \(1171 characters\)
  583. sed "s/^X//" >dif-eplot.c <<'END_OF_dif-eplot.c'
  584. X*** eplot.c    Mon Oct 12 03:08:16 1987
  585. X--- ../eplot.c    Mon Oct 12 01:51:48 1987
  586. X***************
  587. X*** 106,112
  588. X          if (!(svpt = cindex[sletter])) continue;
  589. X          /*if (kbhit()) return;*/
  590. X  
  591. X!         if (sletter < ' ') fprintf(obuf, "^%c': ", sletter);
  592. X          else fprintf(obuf, "'%c': ", sletter);
  593. X  
  594. X          while (!(dspc(store[svpt], store[svpt+1]))) svpt +=2;
  595. X
  596. X--- 106,113 -----
  597. X          if (!(svpt = cindex[sletter])) continue;
  598. X          /*if (kbhit()) return;*/
  599. X  
  600. X!         if (sletter < ' ') fprintf(obuf, "^%c': ", sletter+64);
  601. X!         else if (sletter >= 127) fprintf(obuf, "\\%o: ", sletter);
  602. X          else fprintf(obuf, "'%c': ", sletter);
  603. X  
  604. X          while (!(dspc(store[svpt], store[svpt+1]))) svpt +=2;
  605. X***************
  606. X*** 726,731
  607. X  
  608. X      if (sscanf(ins + itempt, "^%c':", &letter))
  609. X      {    match(':');    letter &=  0x1F; return(2); }
  610. X  
  611. X      if (sscanf(ins + itempt, "Bounds(%d,%d)", &co1, &co2))
  612. X      {    match(')');    return(65); }
  613. X
  614. X--- 727,735 -----
  615. X  
  616. X      if (sscanf(ins + itempt, "^%c':", &letter))
  617. X      {    match(':');    letter &=  0x1F; return(2); }
  618. X+ 
  619. X+     if (sscanf(ins + itempt, "\\%o:", &letter))
  620. X+     {    match(':');    return(2); }
  621. X  
  622. X      if (sscanf(ins + itempt, "Bounds(%d,%d)", &co1, &co2))
  623. X      {    match(')');    return(65); }
  624. END_OF_dif-eplot.c
  625. if test 1171 -ne `wc -c <dif-eplot.c`; then
  626.     echo shar: \"dif-eplot.c\" unpacked with wrong size!
  627. fi
  628. # end of overwriting check
  629. fi
  630. if test -f dif-hplot.c -a "${1}" != "-c" ; then 
  631.   echo shar: Will not over-write existing file \"dif-hplot.c\"
  632. else
  633. echo shar: Extracting \"dif-hplot.c\" \(582 characters\)
  634. sed "s/^X//" >dif-hplot.c <<'END_OF_dif-hplot.c'
  635. X*** hplot.c    Mon Oct 12 03:24:43 1987
  636. X--- ../hplot.c    Mon Oct 12 03:27:18 1987
  637. X***************
  638. X*** 351,356
  639. X      if (sscanf(ins + itempt, "^%c':", &letter))
  640. X      {    match(':');    letter &=  0x1F; return(2); }
  641. X  
  642. X      if (sscanf(ins + itempt, "Bounds(%d,%d)", &co1, &co2))
  643. X      {    match(')');    return(66); }
  644. X  
  645. X
  646. X--- 351,359 -----
  647. X      if (sscanf(ins + itempt, "^%c':", &letter))
  648. X      {    match(':');    letter &=  0x1F; return(2); }
  649. X  
  650. X+     if (sscanf(ins + itempt, "\\%o:", &letter))
  651. X+     {    match(':');    return(2); }
  652. X+ 
  653. X      if (sscanf(ins + itempt, "Bounds(%d,%d)", &co1, &co2))
  654. X      {    match(')');    return(66); }
  655. X  
  656. END_OF_dif-hplot.c
  657. if test 582 -ne `wc -c <dif-hplot.c`; then
  658.     echo shar: \"dif-hplot.c\" unpacked with wrong size!
  659. fi
  660. # end of overwriting check
  661. fi
  662. if test -f dif-vfont.c -a "${1}" != "-c" ; then 
  663.   echo shar: Will not over-write existing file \"dif-vfont.c\"
  664. else
  665. echo shar: Extracting \"dif-vfont.c\" \(627 characters\)
  666. sed "s/^X//" >dif-vfont.c <<'END_OF_dif-vfont.c'
  667. X*** vfont.c    Mon Oct 12 03:08:01 1987
  668. X--- ../vfont.c    Mon Oct 12 02:00:56 1987
  669. X***************
  670. X*** 43,49
  671. X          character->addr = 0;
  672. X          character->up = character->down =
  673. X          character->left = character->right = 0;
  674. X!         character->width = 12; /* ??? */
  675. X      }
  676. X      else if (cindex[letter] || cvflag)
  677. X      {
  678. X
  679. X--- 43,51 -----
  680. X          character->addr = 0;
  681. X          character->up = character->down =
  682. X          character->left = character->right = 0;
  683. X!         if (cindex[letter])
  684. X!         character->width = store[cindex[letter]+2]-store[cindex[letter]];
  685. X!         else character->width = 12; /* ??? */
  686. X      }
  687. X      else if (cindex[letter] || cvflag)
  688. X      {
  689. END_OF_dif-vfont.c
  690. if test 627 -ne `wc -c <dif-vfont.c`; then
  691.     echo shar: \"dif-vfont.c\" unpacked with wrong size!
  692. fi
  693. # end of overwriting check
  694. fi
  695. if test -f h2s.l -a "${1}" != "-c" ; then 
  696.   echo shar: Will not over-write existing file \"h2s.l\"
  697. else
  698. echo shar: Extracting \"h2s.l\" \(443 characters\)
  699. sed "s/^X//" >h2s.l <<'END_OF_h2s.l'
  700. X    int lowh = 0;
  701. X    int hnum  = 0;
  702. X    int started = 0;
  703. X    int ascchar = 32;
  704. X    int ix;
  705. X
  706. X%%
  707. X
  708. X[0-9]+/-    {    lowh    =    atoi(yytext);
  709. X        }
  710. X
  711. X[0-9]+        {    if (!started) printf("charset\n");
  712. X            started = 1;
  713. X            hnum    =    atoi(yytext);
  714. X            if (lowh) ix = lowh;
  715. X                else ix = hnum;
  716. X            lowh  =  0;
  717. X            for (; ix <= hnum; ix++,ascchar++)
  718. X               if (ascchar > ' ' && ascchar < 127)
  719. X                printf("%d,%c\n", ix, ascchar);
  720. X               else
  721. X                printf("%d,\\%o\n", ix, ascchar);
  722. X        }
  723. X
  724. X.    ;
  725. X\n    ;
  726. X
  727. END_OF_h2s.l
  728. if test 443 -ne `wc -c <h2s.l`; then
  729.     echo shar: \"h2s.l\" unpacked with wrong size!
  730. fi
  731. # end of overwriting check
  732. fi
  733. echo shar: End of archive 1 \(of 1\).
  734. cp /dev/null ark1isdone
  735. MISSING=""
  736. for I in 1 ; do
  737.     if test ! -f ark${I}isdone ; then
  738.     MISSING="${MISSING} ${I}"
  739.     fi
  740. done
  741. if test "${MISSING}" = "" ; then
  742.     echo You have unpacked all 1 archives.
  743.     rm -f ark[1-9]isdone
  744. else
  745.     echo You still need to unpack the following archives:
  746.     echo "        " ${MISSING}
  747. fi
  748. ##  End of shell archive.
  749. exit 0
  750.